<%@page import="java.sql.*,studentportal.*"%>
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
</head>

<body  background="Stdbackground.jpg" bgcolor="#FFFFFF" text="#000000" link="#3366CC" vlink="#666666" alink="#996600">
<table border="0" width="100%" bordercolorlight="#666666" bordercolordark="#000000">
  <tr>
    <td width="100%"><img border="0" src="StdPrtlbanner.jpg" width="846" height="65"><!--mstheme--><font face="Trebuchet MS, Arial, Helvetica">&nbsp;<!--mstheme--></font></td>
  </tr>
</table>
<!--mstheme--><font face="Trebuchet MS, Arial, Helvetica"><!--mstheme--></font>
<table  align="center" border="0" width="100%" bordercolorlight="#666666" bordercolordark="#000000">
  <tr>
    <td width="23%">
      <!--mstheme--><font face="Trebuchet MS, Arial, Helvetica">
      <p align="center"><a href="CollegeHome.html">About College</a><!--mstheme--></font></td>
    <td width="17%">
      <!--mstheme--><font face="Trebuchet MS, Arial, Helvetica">
      <p align="center"><a href="AdminLogin.html">Admin</a><!--mstheme--></font></td>
       <td width="17%">
      <!--mstheme--><font face="Trebuchet MS, Arial, Helvetica">
      <p align="center"><a href="AdvertisementView.jsp">Examination</a><!--mstheme--></font></td>
   
    <td width="20%">
      <!--mstheme--><font face="Trebuchet MS, Arial, Helvetica">
      <p align="center"><a href="StudentLogin.html">Students</a><!--mstheme--></font></td>

    <td width="20%">
      <!--mstheme--><font face="Trebuchet MS, Arial, Helvetica">
      <p align="center"><a href="FacultyLogin.html">Faculty</a><!--mstheme--></font></td>

    <td width="20%">
      <!--mstheme--><font face="Trebuchet MS, Arial, Helvetica">
      <p align="center"><a href="AdmissionsHome.html">Admissions</a><!--mstheme--></font></td>

    <td width="20%">
      <!--mstheme--><font face="Trebuchet MS, Arial, Helvetica">
      <p align="center"><a href="CorporatesLogin.html">Corporate</a><!--mstheme--></font></td>
  </tr>
</table>


<p align="center">&nbsp;</p>
<form method="POST" action="./StudentMasterServlet">
  
  <div align="center">
<%
					Connection con1=MySQLDriver.getConnection(); 
					Statement st1=con1.createStatement();
					System.out.println("After Statement");
					ResultSet rs1=st1.executeQuery("SELECT count(*) FROM admission_master where type='"+request.getParameter("TYPE")+"' and status='"+request.getParameter("STATUS")+"'");
					System.out.println("---->>"+rs1);
					int flag=0;
					if(rs1.next())
					  flag=rs1.getInt(1);
					rs1.close();
					st1.close();
					if(flag>0) {
 %>  
  
  
    <center>
    <table border="1" width="68%" bordercolor="#0000FF">
      <tr>
        <td width="100%" colspan="2">
          <p align="center"><font size="4" color="blue"><b>Student Registration Form</b></font></td>
      </tr>
    <tr>
      <td width="50%" valign="middle" align="left">
        <p align="left">Name</td>
      <center>
      <td width="50%"><input type="text" name="sname" size="20" tabindex="2"></td>
      </tr>
      <tr>
        <td width="50%" valign="middle" align="left">Address</td>
        <td width="50%"><textarea rows="2" name="sadd" cols="20" tabindex="3"></textarea></td>
      </tr>
      <tr>
        <td width="50%" valign="middle" align="left">Date of Birth</td>
        <td width="50%"><input type="text" name="sdob" size="20" tabindex="4"><font color="red"><b>* YYYY-MM-DD *</b></font></td>
      </tr>
      <tr>
        <td width="50%" valign="middle" align="left">Phone Number</td>
        <td width="50%"><input type="text" name="sphone" size="20" tabindex="5"></td>
      </tr>
      <tr>
        <td width="50%" valign="middle" align="left">Email ID</td>
        <td width="50%"><input type="text" name="semail" size="20" tabindex="6"></td>
      </tr>
<tr>
        <td width="50%" valign="middle" align="left">Course ID</td>
        <td width="50%"><select size="1" name="cid" tabindex="7">
<%
					 st1=con1.createStatement();
					System.out.println("After Statement");
					 rs1=st1.executeQuery("select * from course_master order by course_id");
					while(rs1.next())
					{
		%>
						<option value='<%=rs1.getString(1)%>'><%=rs1.getString(2)%></option>
		<%
					}
					st1.close();
					con1.close();
		%>
       </select></td>
     </tr>

        <td width="50%" valign="middle" align="left">Admission Date</td>
        <td width="50%"><input type="text" name="sdoa" size="20" tabindex="8"><font color="red"><b>* YYYY-MM-DD *</b></font></td>
      </tr>
      <tr>
        <td width="50%" valign="middle" align="left">Login Name</td>
        <td width="50%"><input type="text" name="slogin" size="20" tabindex="9"></td>
      </tr>
      <tr>
        <td width="100%" colspan="2">
          <p align="center"><input type="submit" value="Submit" name="action" tabindex="10"><input type="submit" value="Reset" name="action" tabindex="11"></td>
      </tr>
    </table>
    </center>
    <%
    } else { %>
      <table border="0" width="100%" height="211">
    <tr>
      <td width="100%" height="69">
        <p align="center"><font size="6" color="#0000FF"><b>Admission are not opened</b></font></td>
    </tr>


  </table>
    
    <%  if(con1!=null)
    con1.close();
    } %>
  </div>
</form>
<p align="left">&nbsp;</p>


</body>

</html>
